{% extends "qa_base.html" %}

{% block content %}
 <div id = 'wrapper'>
 <div id = 'room'>
 <div id = 'CALeft'>
 <div id="main-bar" class="headNormal"> 我要提问</div>
 <div id="main-body" class="ask-body">
 <div id="askform"> 
  <form id="fmask" action="" method="GET" accept-charset="utf-8">
  <div style='display:none;'><input type='hidden' id='csrfmiddlewaretoken' name='csrfmiddlewaretoken' value='41f0e10243e609bfc4edf0fc4c184238' /></div> 
			
         {% if not user %}  <div class="message" > 
                <span class="strong big">You are welcome to start submitting your question anonymously.</span> 
                <p> After submiting your question, you will be redireccted to the login/signup page. Your question will be saved in the current session and will be published after you login with your existing account,or signup for a new account.</p> 
            </div> 
         {% endif %}
            <div class="form-item"> 
            <label for="id_title" >  <label for="id_title"> <strong> 标题:</strong></label> </strong> </label> <span class="form-error"></span><br/>
              <input autocomplete="off" id="id_title" type="text" name="title" size="70"   value = '{{title}}'/> 
              {% if title_error %}
              <h4 class="errorlist">{{title_error}}</h4> 
              {% endif %}
               <div class="title-desc"> 
                    请输入对问题具有描述性质的标题 - “帮忙！紧急求助！”不是建议的提问方式。
                </div> 
            </div> 
           <div id="ask-related-questions"></div> 
           <div class="form-item">  
                {% include "wmd_css.html" %}
                {% include "wmd_js.html" %}
                <div id="wmd-button-bar" class="wmd-panel"></div>
                <div><textarea rows="10" cols="40" name="description" id="wmd-input" class="processed">{%if description%}{{description}}{% endif %}</textarea></div>
                {% if description_error %}
               <h4 class="errorlist">{{description_error}}</h4> 
                {% endif %}
                <div class="preview-toggle">
                        <table width="100%">
                            <tr>
                                <td>
                                    <span id="pre-collapse" title="打开或者关闭Markdown编辑器的实时预览">
                                     <h4> 禁用预览</h4>
                                    </span>
                                </td>
                                <td style="text-align: center;" id="editor-metrics"></td>
                            </tr>
                        </table>  
                 </div>
                <div id="wmd-preview" class="wmd-panel"></div>
              <!--   <br/> <div id="wmd-output" class="wmd-panel"></div>	-->
            </div> 
            
         <div class="form-item"> 
                <strong><label for="id_tags">标签</label>:</strong> (recommended) <span class="form-error"></span><br/> 
                <input autocomplete="off" id="id_tags" type="text" name="tag" size="50" value = '{{tag}}'/>  
                {% if tag_error %}
               <h4 class="errorlist">{{tag_error}}</h4> 
                {% endif %}
            </div> 
			<p class="title-desc"> 
				Tags are short keywords, with no spaces within. At least 0 and up to 5 tags can be used.
			</p> 
             <div class="form-item"> 
                <strong><label for="id_groups">相关群组</label>:</strong><span class="form-error"></span><br/> 
                <input autocomplete="off" id="id_groups" type="text" name="group" size="50" value = '{{group}}'/>  
            </div> 
			<p class="title-desc"> 
				Groups are used to help post the question to related groups.Divided by blank. 
			</p> 
            {% if user %}                                                                   
            <input  type="submit" value="Post here" class="submit"/> 
			<input type= "reset" value = "Reset here" class = "submit"/>
            {% else %}
            <a href = '/login/' class = 'login'>Login/signup to post your question</a>
            {% endif %}
            
  
  </form>
  </div>
  </div>
  </div>
  	<div id = 'CARight'>
    <div class="boxC" id="title_side_bar"> 
    <p class="subtitle darkred">Title Tips</p> 
    <div> 
        <ul class="list-item"> 
            <li> 
            <b> 
                
                ask a question relevant to the 芝麻问答 community 
                
            </b> 
            </li> 
            <li> 
                please try provide enough details
            </li> 
            <li> 
				我们推荐您使用中文描述问题，这样可以得到更多的答复机会。
            </li> 
        </ul> 
        <p class='info-box-follow-up-links'> 
            <a href="/qa/faq/" target="_blank" title="查看常见问题">常见问题 &raquo;</a> 
        </p> 
    </div> 
</div> 
 
 
<div class="boxC" id="editor_side_bar"> 
    <p class="subtitle darkred">Markdown Basics</p> 
    <ul class="list-item"> 
        <li> 
            *italic* or __italic__
        </li> 
        <li> 
			**加粗** 或者 __加粗__ 
        </li> 
        <li> 
            <b>链接</b>:[文本](http://url.com/ "标题")
 
        </li> 
 
        <li> 
            <b>图片</b>?![alt 文本](/path/img.jpg "标题")
 
        </li> 
        <li> 
			列表：
            1.  Foo
            2.  Bar
        </li> 
        <li> 
			to add a line break simply add two spaces to where you would like the new line to be.
        </li> 
        <li> 
			基本的HTML标签也是支持的
        </li> 
    </ul> 
    <p class='info-box-follow-up-links'> 
        <a href="/qa/markdown_help/" target="_blank">有关Markdown详细说明 </a> 
    </p> 
</div> 
 
 
<div class="boxC" id="tags_side_bar" align="left"> 
    <p class="subtitle darkred">What Are Tags</p> 
    <ul class="list-item"> 
        <li> 
            Tags are words that will tell others what this question is about.
        </li> 
        <li> 
            They will help other find your question.
        </li> 
        <li> 
            
                A question can have up to 5 tags, but it must have at least 1.
            
        </li> 
    </ul> 
</div> 
 
    <div class="boxC" id="question_side_bar"> 
    {% if user %}
    <p class="subtitle darkred">
    {% if questions %}Other questions you have asked:
    {% else %}No question has been asked .
    {% endif%}
    </p> 
    
    <ul class="list-item"> 
       {% for question in questions %}
        <li><a href = '/qa/questions/{{question.id}}/'>{{question.title}}</a></li> 
  	   {% endfor %}
    </ul> 
    {% endif %}
    <p class='info-box-follow-up-links'> 
        <a href="/qa/ask/" target="_blank">有关添加问题的详细说明 </a> 
    </p> 
    </div> 
</div>
    <div id="tail" style="clear:both;"> </div>
  </div>
     <div class="spacer3"></div> 
  </div>
{% endblock %}